package com.jeff

import grails.test.*

class DateTagLibTests extends TagLibUnitTestCase {
	DateTagLib dateTagLib
	
    protected void setUp() {
        super.setUp()
		dateTagLib = new DateTagLib()
    }

    protected void tearDown() {
        super.tearDown()
    }

    void testThisYear() {
		String expected = Calendar.getInstance().get(Calendar.YEAR)
		String actual = dateTagLib.thisYear()
		assertEquals("Years don't match", expected, actual)
    }
	
	void testCopyright() {
		String expected = "<div id='copyright'>&copy; 2002 - 2011, Jeff All Rights Reserved</div>"
		String actual = dateTagLib.copyright([startYear:2002], "Jeff")
		assertEquals("copyright tag content not as expected", expected, actual)
	}
}
